<template>
  <div class="hotAct">
    <div class="hotAct_title">
      <div>新闻头条</div>
      <div class="lookmore" @click="$router.push({path:'/News'})">查看更多</div>
    </div>
    <div class="newList">

      <div class="itemList" v-for="(item,index) in data" :key="'item'+index"  @click="goDetail(item,item.linkUrl)" v-show=" index <=1">
        <div class="listTitle">{{item.title}}</div>
        <div
          class="listContent">{{item.subTitle}}</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  data() {
    return {};
  },
  methods: {
     goDetail(item, linkUrl) {
      if (linkUrl == "") {
        this.$router.push({
          path: "/NewDetail",
          query: {
            item: item
          }
        });
      } else {
                     this.$router.push({
          path: "/webLink",
          query: {
            url: linkUrl
          }
        });
      }
    }
  },
  mounted() {
    
  },
  props:['data']
};
</script>
<style scoped>
.boxcontainer {
  margin-top: 0.2rem;
}
.hotAct {
  padding: 0.25rem;
  margin-top: 0.2rem;
  background: #fff;
}
.hotAct_title {
  border-left: 4px solid #dbb47f;
  box-sizing: border-box;
  padding-left: 0.2rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
      font-size: 0.28rem;
}
.lookmore {
  color: #919191;
  font-size: 0.25rem;
    font-weight: initial;
}
.newList {
  width: 100%;
}
.itemList {
  padding-bottom: 0.1rem;
  border-bottom: 1px solid #eeeeee;
}
.listTitle {
  width: 100%;
  margin-top: 0.15rem;
  margin-bottom: 0.1rem;
}
.listContent {
  width: 100%;
  margin-top: 0.1rem;
  margin-bottom: 0.1rem;
  color: #999999;
  line-height: 0.45rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 0.26rem;
}

.container {
  width: 100%;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  padding-bottom: 1.2rem;
  background: #f6f5f5;
      overflow: hidden;
    overflow-y: auto;

}



</style>